Fix start_dir for components of Bundle easyblock#3769
Fix start_dir for components of Bundle easyblock#3769Flamefire wants to merge 2 commits intoeasybuilders:developfrom
Conversation
|
The actual issue here is Turns out the Bundle easyblock has multiple issues and quite a few easyconfigs & easyblocks already rely on the broken behavior. E.g. Clang-AOMP does a configure-step in the Bundle-level using the directories that would be the correct The confusing behavior of the code contradicting the comment is fixed in #3778, the rest needs further discussion. |
|
@boegel I ran into this again when using the Can we merge this? |
(created using
eb --new-pr)I tried using a patch for a bunde component but it failed because the start_dir is wrong. It will always use
build_dir(or a path relative to it if set instart_dirEC parameter) because at the point ofguess_startdirthere are no sources inself.srchence it can't be relative to the unpacked source.The comment and code don't add up too:
Why does it set the last sources final path to the start_dir?
So I'd say the only correct way would be to set
comp.srccorrectly and callguess_start_dirafterwards. Touching a sourcesfinalpathcan never be right ever, can it?Edit: Further investigation shows that
finalpathisn't set correctly for multiple sources. What happens for bundles of multiple components with a single source:finalpathset to that folderfinalpathcomponent2.src = src2and then callingguess_start_dirit will find the source and use itsfinalpathas the start_dir, hence wrongly using the builddirstart_diris manually set in the easyconfig it will still find the correct start_dirapply_patchesuses thefinalpathof the source at an index given in the patch spec, defaulting to 0So this requires either easybuilders/easybuild-framework#4922 or
comp.src[0]['finalpath'] = comp.start_dirafter thecomp.guess_start_dirso that patches work correctly.